const app = getApp();
Page({
    data: {
        vipCard:{},
        cardId:'',
        StatusBar: app.globalData.StatusBar,
        CustomBar: app.globalData.CustomBar,
        TabbarBot: app.globalData.tabbar_bottom
    },
    onLoad: function (options) {
        let _this = this;
        _this.setData({
          cardId: options.cardId
        })
        _this.VipCardInfo()
    },
    VipCardInfo:function(){
      let _this = this;
      wx.request({
        method:'GET',
        url: 'http://localhost:8989/vipcard/' + _this.data.cardId,
        success:(res) => {
          console.log(res)
          _this.setData({
            vipCard: res.data.data
          })
        }
      })
    },
    GoToShop:function(e){
      console.log(e)
      wx.navigateTo({
        url: '/pages/shop/index/index?sid=' + e.currentTarget.dataset.sid,
      })
    }

});
